<script type="text/javascript" charset="utf-8">

	$(document).ready(function(){ldelim} 
		// for redirect url actions
		 $("#redirect").click(function () {ldelim} 
		 	if ($(this).attr("checked")){ldelim}
	      		$(this).attr("value","1");
	      		$("#to_url").attr("disabled","");
			{rdelim}else{ldelim}
				$(this).attr("value","0");
	      		$("#to_url").attr("value","");
	      		$("#to_url").attr("disabled","disabled");				
			{rdelim}			
	    {rdelim});

	{rdelim});

</script>

<!-- dane strony -->
<form action="{$smarty.const.HTTP_URL}edytuj_strone,Panel_Panel,savepage,{$page.id_page},{$page.id_lang}.html" method="post" name="save_edit_page">
<!-- dispatcher info -->
<input type="hidden" name="save_" value="s_pages"/>
<input type="hidden" name="action" id="action_for_page" value="save_edit_page_data"/>

<input type="hidden" name="id_page" value="{$page.id_page}"/>
	
<h2>{$__cl.dane_strony}</h2>
<table class="setup">
	<tr>
		<th>{$__cl.wersja_jezykowa_strony}</th><td>
		<select name=id_lang id=page_language_select onchange="document.location='edytuj_strone,,,{$page.id_page},'+this.value+'.html'">{html_options options=$smarty.const.LANGU|unserial selected=$page.id_lang}</select>
		 </td>
	</tr>
	<tr>		
		<th>{$__cl.nazwa_strony_link}</th><td><input name="page_name" value="{$page.page_name}" style="width:250px;"/></td>
	</tr>
	<tr>		
		<th>{$__cl.rozmieszczenie_linku}</th>
		<td>
			{html_options name=id_grup options=$smarty.const.UMENU|unserial selected=$page.id_grup}
		</td>
	</tr>
	<tr>		
		<th>{$__cl.przekierowuj_strone_na_adres_url}</th>
		<td>
			<input type="checkbox" name="redirect" id="redirect" {if $page.redirect eq 1}checked="checked"{/if}/>
			<input type="text" name="to_url" id="to_url" value="{$page.to_url}" {if $page.redirect ne 1}disabled="disabled"{/if}/>
		</td>
	</tr>	
	<tr>		
		<th>Zastosuj styl dla strony</th>
		<td>
			{html_options name=theme options=$smarty.const.PSTYL|unserial selected=$page.theme}
		</td>
	</tr>
	<tr>		
		<th>Nie wyświetlaj strony</th>
		<td>
			<input type="checkbox" name="plock" value="{if $page.lock eq 1}1{/if}" {if $page.lock eq 1}checked="checked"{/if} onclick="if(this.checked){ldelim} this.value = 1 {rdelim}else{ldelim}this.value = 0{rdelim}"/>
		</td>
	</tr>		
	<tr>		
		<th>Ustaw jako domyślna</th>
		<td>
			<input type="checkbox" name="defaultp" value="{if $page.defaultp eq 1}1{/if}" {if $page.defaultp eq 1}checked="checked"{/if} onclick="if(this.checked){ldelim} this.value = 1 {rdelim}else{ldelim}this.value = 0{rdelim}"/>
		</td>
	</tr>
	<tr>
	<th>Napisz kilka słów o tej stronie</th><td><textarea  name="description" rows="3" cols="30">{$page.description}</textarea></td>
	</tr>
	<tr>
	<th>Napisz kluczowe słowa harakteryzujące ta stronę np: firma,materiały,itd...</th><td><textarea  name="keywords" rows="3" cols="30">{$page.keywords}</textarea></td>
	</tr>		
	<tr>		
		<th class="no_border"></th>
		<td class="no_border">
			<input type="submit" class="button" value="Zapisz zmiany">
			<input type="button" class="button" onclick="document.location='{$smarty.const.HTTP_URL}edytuj_strone,Panel_Panel,delpage,{$page.id_page},{$page.id_lang}.html';" value="Usuń"/>
			<input type="button" class="button" id="podglad_strony" value="Podgląd strony" onclick="document.location='{if $page.redirect eq 1}{$page.to_url}.html{else}{$smarty.const.HTTP_URL}{$page.page_url}.html{/if}';">
		</td>
	</tr>
</table>
</form>
<form>
<h2>Sekcje strony</h2>
<p></p>
<!-- sekcje -->
<table class="setup" width="95%">
	<tr>
		<td width="33%" align="center" valign="middle" class="bg_of"> <h1>kolumna lewa</h1> </td>
		<td width="33%" align="center" valign="middle" class="bg_of"> <h1>kolumna środkowa</h1> </td>
		<td width="33%" align="center" valign="middle" class="bg_of"> <h1>kolumna prawa</h1> </td>
	</tr>

{section name=id loop=$sections }
	<tr>
	{foreach from=$sections[id] key=k item=v}
		<td align="center" valign="middle" {if $v eq 1}class="red bg_on" {else}class="bg_of"{/if}>
		<input type="button" class="button" name="{$k}" value="Sekcja {$k}" onclick="document.location='{if $v eq 1}{$smarty.const.HTTP_URL}edytuj_sekcje_strony,{$page.id_page},{$k},{$page.id_lang}.html{else}{$smarty.const.HTTP_URL}dodaj_nowa_sekcje,{$page.id_page},{$k},{$page.id_lang}.html{/if}'" style="width: 90px;"/>
		<br/>
		{if $v eq 1}aktywna{else}nie aktywna{/if}
		</td>
	{/foreach}
	</tr>
{/section}
	<tr>
		<td colspan="3" align="center" valign="middle" class="bg_of"> <h1>fotter</h1> </td>
	</tr>
</table>
</form>
<!-- $smarty.const.SECTI|unserial|@debug_print_var} -->
<!-- $page|@debug_print_var} --> 